<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>

<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <t:datagrid name="班次明细表" checkbox="true" singleSelect="true" fitColumns="false" title="排班明细表" actionUrl="tmblWorktimeController.do?datagrid&pid=${pid }" idField="id" fit="true" queryMode="group">
   <t:dgCol title="ID"  field="id"  hidden="true"   width="120"></t:dgCol>
   <t:dgCol title="员工号"  field="empcdoe"     width="120"></t:dgCol>
   <t:dgCol title="员工姓名"  field="empname"    query="true"  width="120"></t:dgCol>
   <t:dgCol title="工作地点"  field="workplace"     width="120"></t:dgCol>
   <t:dgCol title="工作日期"  field="workdate" formatter="yyyy-MM-dd" query="true" queryMode="group"  width="120"></t:dgCol>
   <t:dgCol title="工作时长"  field="worktime"     width="120"></t:dgCol>
   <t:dgCol title="上班时间"  field="ondutytime" formatter="yyyy-MM-dd hh:mm:ss"    width="120"></t:dgCol>
   <t:dgCol title="迟到"  field="lateflage"   replace="否_f,是_t" style="background:red;color:white;_t"  width="120"></t:dgCol>
   <t:dgCol title="迟到时间"  field="latetime"     width="120"></t:dgCol>
   <t:dgCol title="下班时间"  field="offdutytime" formatter="yyyy-MM-dd hh:mm:ss"    width="120"></t:dgCol>
   <t:dgCol title="早退"  field="leaveearlyflage"  replace="否_f,是_t" style="background:red;color:white;_t"   width="120"></t:dgCol>
   <t:dgCol title="早退时长"  field="leaveearlytime"     width="120"></t:dgCol> 
   <t:dgCol title="上班打卡"  field="ondutycard"  replace="否_f,是_t" style="background:red;color:white;_f"   width="120"></t:dgCol>
   <t:dgCol title="下班打卡"  field="offdutycard"  replace="否_f,是_t" style="background:red;color:white;_f"   width="120"></t:dgCol>
   <t:dgCol title="上班状态"  field="work"  replace="旷工_f,正常_t,上班缺卡_oc,下班缺卡_fc,迟到_l,早退_e,迟到和早退_el"  width="120"></t:dgCol>
   <t:dgCol title="状态"  field="state"  replace="正常_1,正常_2,替班_3" style="color:white;background:red;_3" width="120"></t:dgCol>
  <t:dgCol title="替班情况"  field="replaceName"    width="120"></t:dgCol>
   <%-- <t:dgCol title="操作" field="opt" width="100"></t:dgCol>
   <t:dgDelOpt title="删除" url="tmblWorktimeController.do?doDel&id={id}" />
   <t:dgToolBar title="录入" icon="icon-add" url="tmblWorktimeController.do?goAdd" funname="add"></t:dgToolBar>
   <t:dgToolBar title="编辑" icon="icon-edit" url="tmblWorktimeController.do?goUpdate" funname="update"></t:dgToolBar>  
   <t:dgToolBar title="查看" icon="icon-search" url="tmblWorktimeController.do?goUpdate" funname="detail"></t:dgToolBar>
	<t:dgToolBar title="查看" icon="icon-search" funname="ExportXls"></t:dgToolBar> --%>
	<t:dgToolBar title="导出" icon="icon-search" funname="ExportXls"></t:dgToolBar>
  </t:datagrid>
  </div>
  <input type="hidden" id='pid' value="${pid }">
 </div>
	
 <script type="text/javascript">
 $(document).ready(function(){//回车按钮失效

 		//给时间控件加上样式

 			 $("input[name='workdate_begin']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
 			 $("input[name='workdate_end']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
 		 
 
});
 
   
 
//导入
function ImportXls() {
	openuploadwin('Excel导入', 'tmblWorktimeController.do?upload', "tmblWorktimeList");
}

//导出
function ExportXls() {
	var pid=$("#pid").val();
	var name=$("input[name='empname']").val();
	var begin=$("input[name='workdate_begin']").val();
	var end = $("input[name='workdate_end']").val();
	window.location = "<%=path%>/tmblWorktimeController.do?exportXls&pid="+pid+"&name="+name+"&begin="+begin+"&end="+end;
}

//模板下载
function ExportXlsByT() {
	JeecgExcelExport("tmblWorktimeController.do?exportXlsByT","tmblWorktimeList");
}
 </script>